<?php
/**
 * Stores information about the current project
 *
 * @category    IPB_CMS
 * @package     App_Information
 * @copyright   Copyright (c) 2009 IPB CMS <http://ipb-cms.googlecode.com/>
 * @license     http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License
 * @author      Henrique Moody <henriquemoody@gmail.com>
 */
class App_Information
{

    /**
     * Singleton instance
     *
     * @var App_Information
     */
    static protected $_instance;

    /**
     * Name of the current project
     *
     * @var string
     */
    protected $_name;

    /**
     * Slogan of the current project
     *
     * @var string
     */
    protected $_slogan;

    /**
     * Name of the current hostname
     *
     * @var string
     */
    protected $_hostname;

    /**
     * Singleton pattern implementation makes "new" unavailable
     *
     * @return void
     */
    protected function __construct()
    {}

    /**
     * Singleton pattern implementation makes "clone" unavailable
     *
     * @return void
     */
    protected function __clone()
    {}

    /**
     * Returns an instance of App_Information
     *
     * Singleton pattern implementation
     *
     * @return App_Information
     */
    static public function getInstance()
    {
        if (!self::$_instance) {
            self::$_instance = new self;
        }
        return self::$_instance;
    }

    /**
     * Returns the name of the current project
     *
     * @return string
     */
    public function getName()
    {
        return $this->_name;
    }

    /**
     * Sets the name of the current project
     *
     * @param string $name
     */
    public function setName($name)
    {
        $this->_name = $name;
    }

    /**
     * Sets the slogan of the current project
     *
     * @param string $slogan
     */
    public function setSlogan($slogan)
    {
        $this->_slogan = $slogan;
    }

    /**
     * Returns the slogan of the current project
     *
     * @return string
     */
    public function getSlogan()
    {
        return $this->_slogan;
    }

    /**
     * Sets the hostname of the current project
     *
     * @param string $hostname
     */
    public function setHostname($hostname)
    {
        $this->_hostname = $hostname;
    }

    /**
     * Returns the hostname of the current project
     *
     * @return string
     */
    public function getHostname()
    {
        return $this->_hostname;
    }

}
